<?php
   
    include_once '../../../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
    
    $posi = $_REQUEST['posi'];
    $oids = $_REQUEST['oid'];
    
    $consu = "select * from segtomado where hcnsolexa = ".$oids;
    $res = $con->query($consu);
    
    while($res2 = mssql_fetch_array($res)){
        $estado = $res2['tmestado'];
        $fecha = $res2['tmfecha'];
        $tm = $res2['tmpnt'];
        $tmc = utf8_encode($res2['tmcual']);
    }
    
    print_r(json_encode(array('estado'=>$estado,'posi'=>$posi,'fecha'=>$fecha,'tm'=>$tm,'tmc'=>$tmc)));
    
    
    $con->cerrarConexion(); 
?>